<%@ page import="com.memora.seguranca.SegUser" 
	page import="com.memora.usuario.Telefone" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'segUser.label', default: 'SegUser')}" />
		<title><g:message code="default.edit.label" args="[entityName]" /></title>
	</head>
	<body>

		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>
				<g:message code="default.edit.label" args="[entityName]" />
				<!--small>Control panel</small-->
				<small>Control Panel</small>
				
			</h1>
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
				<li class="active">Blank page</li>
			</ol>
		</section>

		<div class="callout-memora callout-info">
	        <h4><g:message code="memora.message.ola!"/></h4>
	        <p><g:message code="memora.message.camposobrigatorios"/></p>
	    </div>
	    
		<!-- Main content -->
		<section class="content">
			
			<g:if test="${flash.message}">
				<div class="message" role="status">${flash.message}</div>
			</g:if>
			<g:hasErrors bean="${segUserInstance}">
				<div class="alert alert-danger">
	                <i class="fa fa-ban"></i>
	                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                <b><g:message code="memora.message.opa"/></b>
					<g:eachError bean="${segUserInstance}" var="error">
						<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
							<g:message error="${error}"/>
						</li>
					</g:eachError>
	            </div>
			</g:hasErrors>
			<g:form url="[resource:segUserInstance, action:'update']" method="PUT" >
				<g:hiddenField name="version" value="${segUserInstance?.version}" />
				<fieldset class="form">
					<g:render template="form"/>
				</fieldset>
				<fieldset class="buttons">
					<g:actionSubmit class="btn btn-success" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" />

					<g:link class="btn btn-default btn-flat" action="show" id="${session.SPRING_SECURITY_CONTEXT?.authentication?.principal?.id}">
					<g:message code="memora.button.cancelar" />
				</g:link>
				</fieldset>
			</g:form>
		</section><!-- /.content -->
	</body>
</html>
